package com.hsgene.order.constants.v1;

import com.hsgene.common.util.exception.ValidationException;

/**
 * @Description: //是否为机构上传类型
 * @ProjectName: hdas-geneshop-server
 * @Package: com.hsgene.order.constants.v1
 * @Author: FX
 * @CreateDate: 2019/1/16 17:08
 * @Version: 1.0
 * Copyright: Copyright (c) 2019
 */
public enum ReportUploadFlag {
    /**
     * 是否为机构上传
     */
    YES(1,"是"),
    NO(0,"否");
    private int code;
    private String desc;


    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    ReportUploadFlag(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static ReportUploadFlag getEnum(int code){
        for(ReportUploadFlag flag:values()){
            if(flag.getCode()==code){
              return flag;
            }
        }
        throw new ValidationException("是否为机构枚举值异常");
    }
}
